djinnifandomcom-20200222-history
Folder structure and file formats
Category:D'jinni In this subchapter I’m going to describe the structure of the Data folder and the formats recognized by the D’jinni Editor. This folder is special because all the files needed to create your own module are saved here, so it’s a very hands-on area. There’s one important thing to remember here – The D’jinni Editor can’t “see” folders. For the editor there is only one sequence of files. After you have run the D’jinni, it initializes the content of the Data folder. That’s how the editor knows which files are available. It is very important to keep this in mind because it affects your work in two specific ways. Firstly, it means that there cannot be two files of the same name. It doesn’t matter if one of them is in the Data\2DA folder, and the second in Data\Dialogues. There cannot be two files of the same name! Secondly, when the D’jinni is already open and you create a new file in the Data folder – via Windows Explorer, for instance – the file won’t be visible to the editor! You will have to run the D’jinni again. All files must be created at the D’jinni Editor level. Please, keep these two important things in mind. Remember also that the name of the file cannot be longer than 16 characters and cannot include any special signs (like a space, for example.) Let’s cut to the chase then. This is the structure of the Data folder, along with short descriptions of its contents: \Data\ :\2DA\ the .2da files. These are simple databases with various definitions for objects used in The Witcher: ::\alchemy\ - .2da files related to alchemy, ::\areamaps\ - .2da files related to locations, ::\combat\ - .2da files related to combat, ::\creature\ - .2da files related to monsters, ::\cutscenes\ - .2da files related to movie sequences, ::\gameplay\ - .2da files related to gameplay, ::\gfx\ - .2da files related to special effects, ::\sound\ - .2da files related to sounds, ::\toolset\ - .2da files related to the D’jinni Editor. :\Cutscenes\ all the .cut files. These are files with the movie sequences created using The Witcher’s game engine. :\Dialogues\ the .dlg files. These are files with the conversations (dialogue) for the characters. :\Djinni\ the files used exclusively by the D’jinni Editor. :\FX\ the .wfx files. These are files with special effects. ::\Alchemy\ - special effects related to alchemy, ::\CameraEffects\ - special effects related to camera effects, ::\Combat\ - special effects related to combat, ::\Cutscenes\ - special effects related to movie sequences, ::\Deaths\ - special effects related to death, ::\Decorations\ - special effects related to decoration, ::\Gameplay\ - special effects related to gameplay, ::\GUI\ - special effects related to the graphical interface, ::\Monsters\ - special effects related to monsters, ::\Signs\ - special effects related to witchers’ signs, ::\Spawn\ - special effects related to respawning, ::\Work\ - special effects related to work. :\Items\ the .mdl files. These are 3D item models created using 3D Studio MAX. :\Materials\ the .mat files. These are files containing material definitions for the 3D models. :\Meshes\ the .mdl files. These are 3D mesh models created using 3D Studio MAX. ::\Characters\ - 3D models of characters, ::\Critters\ - 3D models of monsters, ::\CutsceneSets\ - 3D models used by movie sequences, ::\GUI\ - 3D models used by the graphical interface, ::\Items\ - 3D models of items, ::\Locations\ - 3D models of locations, ::\Placeables\ - 3D models of placeables, ::\Toolset\ - 3D models used by the D’jinni Editor. :\Modules\ the .adv files. This is the format used for saving modules. :\Music\ the .ogg files. These are music files. :\Quests\ the .qst and .qdb format files. The .qst files are the quests, whereas the .qdb files are databases containing sets of quests. :\Scripts\ the .nss and .lua files. The .nss files are scripts written in the language of Neverwinter Nights, whereas the .lua files are scripts written in the Lua script language. :\Sounds\ the .wav files. These are various sound files. ::\Creatures\ - monster sounds, ::\Cutscenes\ - sounds used in movie sequences, ::\Doors\ - door sounds, ::\Enemies\ - enemy sounds, ::\Fistfight\ - sounds used in fistfights, ::\Hero\ - Witcher sounds, ::\Impacts\ - impact sounds, ::\Inventory\ - equipment sounds, ::\Items\ - item sounds, ::\Jingles\ - bell sounds, ::\Locations\ - location specific sounds, ::\Magic\ - magic sounds, ::\Menu\ - menu sounds, ::\Misc\ - other various sounds, ::\Movement\ - movement sounds, ::\Sequence\ - sounds used in fight sequences, ::\SoundGroups\ - group sounds, ::\Special\ - special sounds, ::\Voicesets\ - voice sounds, ::\Weapons\ - weapon sounds. :\Templates\ templates for various things in The Witcher. ::\Actionpoints\ - the .uta files. These are templates for action points, ::\CameraSphere\ - the .cam files. These are templates for camera spheres, ::\Characters\ - the .utc files. These are templates for characters, :::\Animals\ - templates for animals, :::\Commoners\ - templates for common characters, :::\Cutscenes\ - templates used in movie sequences, :::\Enemies\ - templates for enemies, :::\Monsters\ - templates for monsters, :::\NPC\ - templates for NPCs, :::\Player\ - templates for the player, :::\Triggered\ - templates for triggers, :::\Unique\ - unique templates, ::\Doors\ - the .utd files. These are templates for doors used to move between areas, from the street into a building, for example, ::\Fx\ - the .wfx files. These are files with visual effects, ::\Gifts\ - the .uti files. These are templates for gift items, ::\Items\ - the .uti files. These are templates for items, ::\NPCSpawn\ - the .npc files. These are templates for NPCs, ::\Placeables\ - the .utp files. These are templates for placeables, :::\Containers\ - templates for containers (chests, barrels etc.), :::\Cutscenes\ - templates for placeables used in movie sequences, :::\Decorations\ - templates for decorations, :::\Light_Sources\ - templates for light sources, :::\Special\ - special templates, :::\Story\ - templates for placeables related to the plot, :::\Useables\ - templates for placeables that can be used, ::\Shops\ - the .utm files. These are templates for shops and warehouses, ::\Sounds\ - the .uts files. These are templates for sounds, ::\Spawnpoints\ - the .utx files. These are templates for spawn points, ::\Spawnsets\ - the .spn files. These are templates for spawn sets, ::\Triggers\ - the .utt files. These are templates for triggers, ::\Waypoints\ - the .utw files. These are templates for waypoints. :\Voices\ sound files used by the characters. If you search through the folders of the D’jinni Editor and the game itself, you will encounter other types of files. For us, the creators of new modules, these files are of little consequence. They are very important for the editor and the game, however. These include following files: * Models: :- .mdl – these files are the 3D models created using 3D Studio MAX. They contain both the models of the characters, animals, locations etc., and the models used by the game’s graphical interface, :- .mdv – these files contain “virtual animations”. They have the same name as the given .mdl file. If there is no .mdv file for the .mdl file, it means that the given model has no “virtual animation”, :- .mde – these files contain events, e.g. sounds for the animations, :- .mda - these files contain animations, :- .wok – these files contain model navigation and collisions. They are used exclusively by the areas, :- .pkw, .dwk – these files contain placeables and door collisions, :- .set – these files contain areas and information about the 3D models used for the given area, e.g. a type of grass. * Textures: :- .tga – it is the basic format of the uncompressed graphics files used by the D’jinni Editor and The Witcher, :- .dds – it is the basic format of the compressed graphics files used by the D’jinni Editor and The Witcher, :- .bmp – these graphics files are used only to create area maps (these are maps the player can see in his journal.) They have to be saved in 8-bit format, i.e. in 256 colors, :- .txi – these are not graphics files, but they contain additional data (e.g. filters) used for the given graphics file. They have the same name as the given graphics file, * Sounds: :- .mp3 – .mp3 sound files (compressed), :- .wav – .wav sound files (uncompressed), :- .ogg – .ogg sound files (compressed), :- .say – these are not sound files. They contain information about lip movements used by the characters during conversations. They have the same name as the given sound file. * Physics: :- .ka – these files contain information about game physics. They are used by the Karma System employed by The Witcher, :- .psk – these files contain physical simulations. This format is used by the Unreal Engine. Finally, I should also mention the .bif files – these are archive files, similar to .zip or .rar files, but the format was developed by The Witcher team. These files contain all the other files. For example, sound files are saved in the sounds.bif file. The priority system used by the D’jinni Editor and the Witcher game is also worth mentioning. I’ll show you how it works using an example involving the sounds.bif file. Let’s assume the sounds.bif file already contains a shot.wav file (an arrowshot sound file). When you create a file of the same name, i.e. a shot.wav, and save it in the D’jinni folder, the names will overlap – after all, we’ve already got one file of this name saved in the sounds.bif file. However, because of the way the priority system works, nothing is going to happen. The unarchived shot.wav file has higher priority than the shot.wav file saved in the sounds.bif file. It is very good news for us because we can create our own, higher priority files and still retain identically named files in the .bif files. This way we won’t damage the originals.